import com.itheima.domain.Account;

import com.itheima.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class App {
    public static void main(String[] args) {
        //加载核心配置文件
        ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");
        //从ioC容器获取service接口实现类
        AccountService accountService = (AccountService) app.getBean("accountService");
        List<Account>list=accountService.findAll();
        for (Account account : list) {
            System.out.println(account);
        }

           Account aa=new Account();
          aa.setName("赵六");
           aa.setMoney(9987.2);

       //     accountService.save(aa);


    }
}
